#pragma once

#include <stdio.h>

#define NONE_FLUSH 1
#define LINE_FLUSH (1<<1)
#define FULL_FLUSH (1<<2)

typedef struct MyFile
{
    int Fileno;//文件描述符
    int flag;//文件权限
    char outbuffer[MAX];//文件缓冲区
    int bufferlen;//缓冲有效长度
    int flush_method;//刷新方式
}MyFile;

MyFile* MyFopen(cosnt char* path, const char* mode);
void MyFclose(Myfile* );
int MyFwrite(MyFile*, void* str, int len);
void myFFlush(MyFile* );
